package com.demo.gateway.vo.core;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.demo.gateway.exception.ErrorStatus;

import lombok.Data;

/**
 * @author: demo
 * @date: 2020年5月24日
 * @Document : 异常数据类型
 */
@Data
@JsonInclude(Include.NON_NULL)
public class ErrorVO {
	private Object errorStack;
	private String errorMsg;
	private Integer errorCode;
	private Boolean success;

	public void setErrorStatus(ErrorStatus status) {
		this.errorCode = status.code();
		this.errorMsg = status.value();
	}
}
